package com.example.demo.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.example.demo.entity.User;
import com.example.demo.feign.impl.HystrixClientFallback;
@FeignClient(name = "microservice-provider-user",fallback = HystrixClientFallback.class) //微服务名称
public interface UserFeignClient {
	
	
	@RequestMapping(value = "/getUser/{id}", method = RequestMethod.GET)
	public User getUserById(@PathVariable("id") Long id); //PathVariable annotation was empty on param 0. 需要指定path下的名称
}


